package org.dandsoft.blackbox.laboratory.samples.lighter;

/**
 * Created by IntelliJ IDEA.
 * User: dvilyuzhanin
 * Date: 23.03.2009 19:35:17
 */
public class Sun {
    private int centerX;
    private int centerY;
    private double speed;
    private int range;
    private double x;
    private double y;
    private int intensity;

    public void alive() {
        double vx = x - centerX;
        double vy = y - centerY;

        double newX = vx * Math.cos(speed) - vy * Math.sin(speed);
        double newY = vx * Math.sin(speed) + vy * Math.cos(speed);

        this.x = newX + centerX;
        this.y = newY + centerY;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }

    public int getIntensity() {
        return intensity;
    }

    public void setIntensity(int intensity) {
        this.intensity = intensity;
    }

    public int getRange() {
        return range;
    }

    public void setRange(int range) {
        this.range = range;
    }

    public double getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getCenterX() {
        return centerX;
    }

    public void setCenterX(int centerX) {
        this.centerX = centerX;
    }

    public int getCenterY() {
        return centerY;
    }

    public void setCenterY(int centerY) {
        this.centerY = centerY;
    }
}
